<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    .ajaxloading {
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 99999999;
      flex-direction: column;
    }

    .ajaxloading a {
      font-size: 16px;
      margin-top: 10px;
    }

    .ajaxloading svg {
      width: 46px;
      height: 46px;
      fill: #000;

      -webkit-animation: rotate 0.7s linear infinite;
      animation: rotate 0.7s linear infinite;
    }

    @-webkit-keyframes rotate {
      0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
      }

      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
      }
    }

    @keyframes rotate {
      0% {
        -webkit-transform: rotate(0);
        transform: rotate(0);
      }

      100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }
  </style>
</head>

<body>



  <div class="ajaxloading">
    <svg t="1592222422836" class="order_btn_icon" viewBox="0 0 1024 1024" version="1.1"
      xmlns="http://www.w3.org/2000/svg" p-id="6126">
      <path
        d="M512.606821 958.898283c-246.319012 0-446.698738-200.379727-446.698738-446.698738S266.287809 65.479317 512.606821 65.479317c17.73185 0 32.117488 14.385639 32.117488 32.117488s-14.385639 32.117488-32.117488 32.117488c-210.897268 0-382.463762 171.58696-382.463762 382.484228s171.566494 382.463762 382.463762 382.463762 382.484228-171.566494 382.484228-382.463762c0-106.013499-42.384319-204.603935-119.332852-277.558503-12.859889-12.211113-13.403265-32.536021-1.212618-45.416376 12.190647-12.901845 32.536021-13.403265 45.416376-1.212618 89.870844 85.229127 139.365094 200.35926 139.365094 324.187497C959.327048 758.518556 758.925832 958.898283 512.606821 958.898283z"
        p-id="6127"></path>
    </svg>
    <a href="' . $resArray[" paypal_url"] . '" >pay</a>
</div>
<script type="text/javascript">
  const MAX_WAIT = 1500;          // 1.5 s 足够 Safari 完成跳转
  let jumped = false;

  window.addEventListener(' pagehide', () => { jumped = true; });
  window.addEventListener('unload', () => { jumped = true; });

  window.location.href = "' . $resArray["paypal_url"] . '"

  setTimeout(() => {
    if (!jumped) {
      console.warn('跳转被拦截！');
    }
  }, MAX_WAIT);
</script>
</body>

</html>